<template>
    <div>
        <el-input
        type="textarea"
        autosize
        placeholder="请输入标题"
        v-model="textarea1">
        </el-input>
        <div style="margin: 20px 0;"></div>
        <el-input
        type="textarea"
        :autosize="{ minRows: 2, maxRows: 4}"
        placeholder="请输入内容"
        v-model="textarea2">
        </el-input>
        <el-button type="primary" plain @click="changeNotice()">确认发布</el-button>
    </div>
</template>


<script>
import store from '../../store'
export default {
    name:"info",
    store,
  data() {
    return {
      textarea1: '',
      textarea2: ''
    }
  },
  methods: {
      changeNotice(){
        store.dispatch('setText1',this.textarea1)
        store.dispatch('setText2',this.textarea2)
      }
  }
}
</script>